import tool

# 先序建立二叉树
head = tool.create_preorder()
# 中序加后序建立二叉树
# head = tool.create_inpost()
# 层次建立二叉树
# head = tool.create_level()

# 先序遍历
print('先序遍历结果:', end='\t')
tool.preorder_traverse(head)
print('\n')
# 中序遍历
print('中序遍历结果:', end='\t')
tool.inorder_traverse(head)
print('\n')
# 后序遍历
print('后序遍历结果:', end='\t')
tool.postorder_traverse(head)
print('\n')
# 层次遍历
print('层次遍历结果:', end='\t')
tool.levelorder_traverse(head)
